package com.sgg.redis7.controller;

import com.sgg.redis7.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：codeJ
 * @Create：2025/6/2
 */
@RestController
@Slf4j
@Api(tags = "订单接口")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @ApiOperation("新增订单")
    @RequestMapping("/order/add")
    public void addOrder(){
        orderService.addOrder();
    }

    @ApiOperation("查询订单")
    @RequestMapping("/order/{keyId}")
    public void getOrderById(@PathVariable Integer keyId){
        orderService.getOrderById(keyId);
    }

}
